import { defineStore } from "pinia";

export const useCountStore = defineStore('count', {
    actions: {
        increment(value:number) {
            console.log('incretment called', value)
            // change data
            if (this.sum < 10) {
                this.sum += value
            }
        }
    },
    state() {
        return {
            sum: 1,
            school: 'adCdu',
            address: 'cldd'
        }
    },
    getters: {
        // bigSum(state) {
        //     return state.sum * 10
        // },
        bigSum:state => state.sum * 10,
        upperSchool():string{
            // return state.school.toUpperCase()
            return this.school.toUpperCase()
        }
    }
})